package com.usdt.system.mapper.cp;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.usdt.system.domain.resp.BatchClueRespVO;
import com.usdt.system.domain.resp.BatchVisitRespVO;
import com.usdt.system.domain.resp.SalesDataRespVO;
import com.usdt.system.domain.resp.SalesUserMonthCountRespVO;

@Mapper
public interface SalesCountMapper {

	List<SalesDataRespVO> getClueUserCount(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate,
			@Param("deptIds")List<String> deptIds);

	IPage<BatchClueRespVO> getClueUserData(
			Page page, 
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);
	
	List<BatchClueRespVO> getClueUserDataExport(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);

	List<SalesDataRespVO> getVisitUserCount(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate,
			@Param("deptIds")List<String> deptIds);

	IPage<BatchVisitRespVO> getVisitUserData(
			Page page, 
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);
	
	List<BatchVisitRespVO> getVisitUserDataExport(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);

	List<SalesDataRespVO> getClueSourceCount(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate,
			@Param("deptIds")List<String> deptIds);

	IPage<BatchClueRespVO> getClueSourceData(
			Page page, 
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);
	
	List<BatchClueRespVO> getClueSourceDataExport(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);
	
	List<SalesDataRespVO> getVisitSourceCount(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate,
			@Param("deptIds")List<String> deptIds);

	IPage<BatchVisitRespVO> getVisitSourceData(
			Page page, 
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);
	
	List<BatchVisitRespVO> getVisitSourceDataExport(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate, 
			@Param("deptIds")List<String> deptIds,
			@Param("id")String id,
			@Param("param1")String param1,
			@Param("param2")String param2
			);

	/**根据手机号，部门获取到访的渠道
	 * @param phoneNumber
	 * @param deptId
	 * @return
	 */
	SalesDataRespVO getSourceByPhoneNumberAndDeptId(
			@Param("phoneNumber")String phoneNumber, 
			@Param("deptId")String deptId);

	/**线索人员按月统计
	 * @param startDate
	 * @param endDate
	 * @param deptIds
	 */
	List<SalesUserMonthCountRespVO> getClueUserMonthCount(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate,
			@Param("deptIds")List<String> deptIds);

	/**到访人员按月统计
	 * @param startDate
	 * @param endDate
	 * @param deptIds
	 */
	List<SalesUserMonthCountRespVO> getVisitUserMonthCount(
			@Param("startDate")String startDate, 
			@Param("endDate")String endDate,
			@Param("deptIds")List<String> deptIds);
	
}
